<?php
App::uses( 'MemberAppModel', 'Model');

class Expert extends AppModel {
    var $name = 'Expert';


    var $validate = array(
    	'email' => array(
    		'notempty' => array(
    			'rule' => array('notempty'),
    			'message' => 'E-mail not null.',
    			'allowEmpty' => false,
    			'required' => true,
    		),
    	
    		'maxlength' => array(
    			'rule' => array('maxlength', 250),
    			'message' => 'E-mail is not more than 250 character.',
    			'allowEmpty' => false,
    			'required' => true,
    		),
    		
    		'email' => array(
    			'rule' => array('email'),
    			'message' => 'E-mail is not format.',
    			'allowEmpty' => false,
    			'required' => true,
    		),
    	),
    	
        'fullname' => array(
            'notempty' => array(
                'rule' => array('notempty'),
                'message' => 'Fullname not null.',
                'allowEmpty' => false,
                'required' => true,
            ),

            'maxlength' => array(
                'rule' => array('maxlength', 250),
                'message' => 'Fullname is not more than 250 character.',
                'allowEmpty' => false,
                'required' => true,
            ),
        ),

        'address' => array(
            'maxlength' => array(
                'rule' => array('maxlength', 250),
                'message' => 'Address is not more than 250 character',
                'allowEmpty' => true,
                'required' => false,
            ),
        ),

        'phone' => array(
            'maxlength' => array(
                'rule' => array('maxlength', 20),
                'message' => 'Phone is not more than 20 character',
                'allowEmpty' => true,
                'required' => false,
            ),
        ),
    	
    	'mobile' => array(
    		'maxlength' => array(
    			'rule' => array('maxlength', 20),
    			'message' => 'Mobile is not more than 20 character',
    			'allowEmpty' => true,
    			'required' => false,
    		),
    	),
    );

}
